package com.easybuilder.core.dictionary.dao;

import com.easybuilder.common.base.dao.BaseDao;
import com.easybuilder.core.dictionary.entity.SysDictionaryItem;
import com.easybuilder.core.dictionary.view.DictionaryView;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.ExampleMapper;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface SysDictionaryItemDao extends BaseDao<SysDictionaryItem>, ExampleMapper<SysDictionaryItem> {

    @Select("select item_name label, item_code value, disabled from sys_dictionary_item where dictionary_id = #{dict_id} order by sort")
    List<DictionaryView> getDictionaryView(Long dict_id);
}